# $Id: PKGBUILD 87395 2013-03-30 17:58:57Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=signon-ui
pkgver=0.14
_pkgver=0.14+bzr85
pkgrel=1
pkgdesc="UI component that responsible for handling the user interactions which can happen during the login process of an online account"
arch=('i686' 'x86_64')
url="https://launchpad.net/online-accounts-signon-ui"
license=('GPL')
depends=('libaccounts-qt' 'qtwebkit' 'signon' 'libnotify')
source=(https://launchpad.net/online-accounts-signon-ui/13.04/$_pkgver/+download/$pkgname-$_pkgver.tar.bz2
        Makefile)
md5sums=('5857a1b9ed957a5de72863c3868049da'
         'c73ecd27c76a9060862512b7678ae4f1')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # Do not install tests
  echo 'INSTALLS =' >>tests/unit/tst_inactivity_timer.pro
  echo 'INSTALLS =' >>tests/unit/tst_signon_ui.pro

  # Fix build
  cp "$srcdir/Makefile" po/Makefile

  qmake-qt4 PREFIX=/usr LIBDIR=/usr/lib
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make INSTALL_ROOT="$pkgdir" install
}
